#include "mainwindow.h"

#include <QtGui/QApplication>

#include <csocketcommunication.h>

#include <protocol/Command.h>
#include <protocol/ClientLogin.h>

CSocketCommunication socketCom;

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    MainWindow mainWindow;
    mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
    mainWindow.showExpanded();


    protocal::ClientLogin *clientLogin = new protocal::ClientLogin;
    char* username = "aicro\t\t\t\t\t";
    memcpy(clientLogin->username, username, strlen(username) + 1);

    char* password = "12345\t\t\t\t\t";
    memcpy(clientLogin->password, password, strlen(password) + 1);
    socketCom.sendRequest("127.0.0.1", 6178, protocal::CLI_LOGIN, (void*)clientLogin, sizeof(protocal::ClientLogin));



    return app.exec();
}
